package com.tinyideatech;

import com.tinyideatech.framework.config.WebSecurityConfiguration;
import com.tinyideatech.wechat.Interceptor.AppInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
//import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@SpringBootApplication
//@EnableRedisHttpSession
public class WebAdminApplication extends WebMvcConfigurerAdapter {

    @Autowired
    AppInterceptor appInterceptor;

    public static void main(String[] args) {
        SpringApplication.run(WebAdminApplication.class, args);
    }

    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(appInterceptor).addPathPatterns("/wx/**");
    }
}
